# Git

> Out of the box, Vercel's Hobby plan deploys `main` or `master` to production.

# Git

## Suggested Branching for Vercel

Out of the box, Vercel's Hobby plan deploys `main` or `master` to production.

All other branches pushed to origin automatically build and deploy to preview URLs.

To prevent builds from running on every branch, use `vercel.json` to specify which branches should not deploy when pushed to origin.

`/vercel.json`

You need a Pro or Enterprise account to associate a branch with an environment. On the free plan, you cannot prevent automatic builds by environment or assign a branch to a custom environment.

There is a workaround. Create a `preview` branch and only merge to, push to, or accept pull requests against that branch when you want a preview build.

https://vercel.com/docs/project-configuration/git-configuration 

The limits are high, but avoid burning build minutes on branches that are only storing work in progress. The Hobby plan currently allows 100 build hours per month shared across all projects on the account.

You can specify directories like feat/ to exclude as well.

``` JSON
{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "git": {
    "deploymentEnabled": {
      "main": true,
      "preview": true,
      "development": false,
      "feat/*": false
    }
  }
}
```

Alternatively, turn off all deployments: https://vercel.com/docs/project-configuration/git-configuration#turning-off-all-automatic-deployments

## Local maintenance

Run the local linter or formatter commands defined by the application repository rather than assuming this documentation site's scripts are identical to Core. When an application includes ESLint auto-fixes, the usual repair command is:

```bash
npx eslint --fix .
```
